package com.ruoyi.user.service.impl;

import com.ruoyi.common.utils.DateUtils;

import com.ruoyi.user.domain.FamilyMemberImageMap1;
import com.ruoyi.user.mapper.FamilyMemberImageMap1Mapper;
import com.ruoyi.user.service.IFamilyMemberImageMap1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 家庭成员与图像映射Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-31
 */
@Service
public class FamilyMemberImageMap1ServiceImpl implements IFamilyMemberImageMap1Service
{
    @Autowired
    private FamilyMemberImageMap1Mapper familyMemberImageMap1Mapper;

    /**
     * 查询家庭成员与图像映射
     * 
     * @param id 家庭成员与图像映射主键
     * @return 家庭成员与图像映射
     */
    @Override
    public FamilyMemberImageMap1 selectFamilyMemberImageMapById(Long id)
    {
        return familyMemberImageMap1Mapper.selectFamilyMemberImageMapById(id);
    }

    /**
     * 查询家庭成员与图像映射列表
     * 
     * @param familyMemberImageMap1 家庭成员与图像映射
     * @return 家庭成员与图像映射
     */
    @Override
    public List<FamilyMemberImageMap1> selectFamilyMemberImageMapList(FamilyMemberImageMap1 familyMemberImageMap1)
    {
        return familyMemberImageMap1Mapper.selectFamilyMemberImageMapList(familyMemberImageMap1);
    }

    /**
     * 新增家庭成员与图像映射
     * 
     * @param familyMemberImageMap1 家庭成员与图像映射
     * @return 结果
     */
    @Override
    public int insertFamilyMemberImageMap(FamilyMemberImageMap1 familyMemberImageMap1)
    {
        familyMemberImageMap1.setCreateTime(DateUtils.getNowDate());
        return familyMemberImageMap1Mapper.insertFamilyMemberImageMap(familyMemberImageMap1);
    }

    /**
     * 修改家庭成员与图像映射
     * 
     * @param familyMemberImageMap1 家庭成员与图像映射
     * @return 结果
     */
    @Override
    public int updateFamilyMemberImageMap(FamilyMemberImageMap1 familyMemberImageMap1)
    {
        familyMemberImageMap1.setUpdateTime(DateUtils.getNowDate());
        return familyMemberImageMap1Mapper.updateFamilyMemberImageMap(familyMemberImageMap1);
    }

    /**
     * 批量删除家庭成员与图像映射
     * 
     * @param ids 需要删除的家庭成员与图像映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberImageMapByIds(Long[] ids)
    {
        return familyMemberImageMap1Mapper.deleteFamilyMemberImageMapByIds(ids);
    }

    /**
     * 删除家庭成员与图像映射信息
     * 
     * @param id 家庭成员与图像映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberImageMapById(Long id)
    {
        return familyMemberImageMap1Mapper.deleteFamilyMemberImageMapById(id);
    }
}
